import 'dart:convert' show json;


class TestDetailModel {

  int id;
  int isshow;
  int istop;
  int type;
  String author;
  String createusername;
  String posttime;
  String serpath;
  String sortcode;
  String sortname;
  String thumbpath;
  String title;


  TestDetailModel.fromParams({this.id, this.isshow, this.istop, this.type, this.author, this.createusername, this.posttime, this.serpath, this.sortcode, this.sortname, this.thumbpath, this.title});

  factory TestDetailModel(jsonStr) => jsonStr is String ? TestDetailModel.fromJson(json.decode(jsonStr)) : TestDetailModel.fromJson(jsonStr);

  TestDetailModel.fromJson(jsonRes) {
    id = jsonRes['id'];
    isshow = jsonRes['isshow'];
    istop = jsonRes['istop'];
    type = jsonRes['type'];
    author = jsonRes['author'];
    createusername = jsonRes['createusername'];
    posttime = jsonRes['posttime'];
    serpath = jsonRes['serpath'];
    sortcode = jsonRes['sortcode'];
    sortname = jsonRes['sortname'];
    thumbpath = jsonRes['thumbpath'];
    title = jsonRes['title'];

  }

  @override
  String toString() {
    return '{"id": $id,"isshow": $isshow,"istop": $istop,"type": $type,"author": ${author != null?'${json.encode(author)}':'null'},"createusername": ${createusername != null?'${json.encode(createusername)}':'null'},"posttime": ${posttime != null?'${json.encode(posttime)}':'null'},"serpath": ${serpath != null?'${json.encode(serpath)}':'null'},"sortcode": ${sortcode != null?'${json.encode(sortcode)}':'null'},"sortname": ${sortname != null?'${json.encode(sortname)}':'null'},"thumbpath": ${thumbpath != null?'${json.encode(thumbpath)}':'null'},"title": ${title != null?'${json.encode(title)}':'null'}}';
  }
}

